<?php echo form_open('user/edit',array('class'=>'form-horizontal form-validate','id'=>'frm'));?>
<fieldset>
    <legend><h4><?php echo $title;?></h4></legend>
    <table class="table-form-submit">
        <tr>
            <td><label for="username">Username *</label></td>
            <td><input type="email" aria-invalid="false" required="" name="username" value="<?php echo $user['username']; ?>" placeholder="Email Address e.g test@example.com" class="form-control" /></td>
        </tr>
        <tr>
            <td><label for="password">Password </label></td>
            <td><input type="password" name="password" placeholder="Password" class="form-control" /></td>
        </tr>
        <tr>
            <td><label for="phone">Phone</label></td>
            <td><input type="text" name="phone" value="<?php echo $user['phone']; ?>" placeholder="Phone number" class="form-control" /></td>
        </tr>
        <tr>
            <td><label for="role_id">Select Role *</label></td>
            <td>
            <?php echo form_dropdown('role_id', $roles, $user['role_id'], 'class="form-control"'); ?>
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                <label class="checkbox">
                    <input name="activate" type="checkbox" checked="checked" /> Active
                </label>
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                <?php echo form_hidden('user_id', $user['user_id']); ?>
                <?php echo $form; ?>
            </td>
        </tr>
    </table>
 </fieldset>
<?php echo form_close();?>